/**
 * Copyright (C) 2024
 * All rights reserved, Designed By www.joolun.com
 * 注意：
 * 本软件为www.joolun.com开发研制，未经购买不得使用
 * 购买后可获得全部源代码（禁止转卖、分享、上传到码云、github等开源平台）
 * 一经发现盗用、分享等行为，将追究法律责任，后果自负
 */
import http from "@/api/api";

// 所有供应商(该接口不需要权限)
function getList() {
  return http.requestNew("get", "/mall/supplier/list", {});
}

function getPage(query) {
  return http.requestNew("get", "/mall/supplier/page", {
    params: query
  });
}

function addObj(obj) {
  return http.requestNew("post", "/mall/supplier", {
    data: obj
  });
}

function getObj(id) {
  return http.requestNew("get", "/mall/supplier/" + id);
}

function delObj(id) {
  return http.requestNew("delete", "/mall/supplier/" + id);
}

function putObj(obj) {
  return http.requestNew("put", "/mall/supplier", {
    data: obj
  });
}

function getCount(query) {
  return http.requestNew("get", "/mall/supplier/count", { params: query });
}
export { getPage, addObj, getObj, delObj, putObj, getCount, getList };
